package cn.com.homeyoda.aimate.aihealth.data;

import com.google.gson.JsonObject;

import java.util.List;

import cn.com.homeyoda.aimate.aihealth.bean.AddUserInfoBean;
import cn.com.homeyoda.aimate.aihealth.bean.AnswerAnalysisBean;
import cn.com.homeyoda.aimate.aihealth.bean.AnswerBean;
import cn.com.homeyoda.aimate.aihealth.bean.ArticleBean;
import cn.com.homeyoda.aimate.aihealth.bean.BannerBean;
import cn.com.homeyoda.aimate.aihealth.bean.BaseArticleBean;
import cn.com.homeyoda.aimate.aihealth.bean.BaseResponse;
import cn.com.homeyoda.aimate.aihealth.bean.BaseResponse2;
import cn.com.homeyoda.aimate.aihealth.bean.BindUserQrCode;
import cn.com.homeyoda.aimate.aihealth.bean.BloodPressureBean;
import cn.com.homeyoda.aimate.aihealth.bean.BmiBean;
import cn.com.homeyoda.aimate.aihealth.bean.ChronicDiseaseItemBean;
import cn.com.homeyoda.aimate.aihealth.bean.DeviceIdBean;
import cn.com.homeyoda.aimate.aihealth.bean.DeviceIsAuthBean;
import cn.com.homeyoda.aimate.aihealth.bean.ExaminationReportBean;
import cn.com.homeyoda.aimate.aihealth.bean.ExaminationReportDetailsBean;
import cn.com.homeyoda.aimate.aihealth.bean.ExaminationReportListBean;
import cn.com.homeyoda.aimate.aihealth.bean.FaceInfoBean;
import cn.com.homeyoda.aimate.aihealth.bean.FamilyMembersBean;
import cn.com.homeyoda.aimate.aihealth.bean.FeedBackDetailsBean;
import cn.com.homeyoda.aimate.aihealth.bean.FeedBackListBean;
import cn.com.homeyoda.aimate.aihealth.bean.FeedbackTypeBean;
import cn.com.homeyoda.aimate.aihealth.bean.HomeReportListBean;
import cn.com.homeyoda.aimate.aihealth.bean.InspectionScheduleBean;
import cn.com.homeyoda.aimate.aihealth.bean.InspectionScheduleTypeBean;
import cn.com.homeyoda.aimate.aihealth.bean.IsShowCompleteInfoBean;
import cn.com.homeyoda.aimate.aihealth.bean.IsShowJoinFamilyBean;
import cn.com.homeyoda.aimate.aihealth.bean.IsUpdateBean;
import cn.com.homeyoda.aimate.aihealth.bean.JoinPlanBody;
import cn.com.homeyoda.aimate.aihealth.bean.KePuBannerList;
import cn.com.homeyoda.aimate.aihealth.bean.LevelDataBean;
import cn.com.homeyoda.aimate.aihealth.bean.LoginBean;
import cn.com.homeyoda.aimate.aihealth.bean.LoginQrCodeBean;
import cn.com.homeyoda.aimate.aihealth.bean.MessageDetailBean;
import cn.com.homeyoda.aimate.aihealth.bean.MessageListBean;
import cn.com.homeyoda.aimate.aihealth.bean.MessageTypeListBean;
import cn.com.homeyoda.aimate.aihealth.bean.MyselfPlanBean;
import cn.com.homeyoda.aimate.aihealth.bean.NavigationBean;
import cn.com.homeyoda.aimate.aihealth.bean.PersonalInfoBean;
import cn.com.homeyoda.aimate.aihealth.bean.PopularDetailBean;
import cn.com.homeyoda.aimate.aihealth.bean.PopularListBean;
import cn.com.homeyoda.aimate.aihealth.bean.PossibleFamilyMembersBean;
import cn.com.homeyoda.aimate.aihealth.bean.PromptUserListBean;
import cn.com.homeyoda.aimate.aihealth.bean.QueryLinkBean;
import cn.com.homeyoda.aimate.aihealth.bean.QuestionListBean;
import cn.com.homeyoda.aimate.aihealth.bean.QuestionnaireAnswerBean;
import cn.com.homeyoda.aimate.aihealth.bean.QuestionnaireNetBean;
import cn.com.homeyoda.aimate.aihealth.bean.QuestionnaireOptionBean;
import cn.com.homeyoda.aimate.aihealth.bean.QuestionnaireTopicBean;
import cn.com.homeyoda.aimate.aihealth.bean.QuizListBean;
import cn.com.homeyoda.aimate.aihealth.bean.RankingBean;
import cn.com.homeyoda.aimate.aihealth.bean.RecommendRecipeBean;
import cn.com.homeyoda.aimate.aihealth.bean.ReplenishChronicBean;
import cn.com.homeyoda.aimate.aihealth.bean.SportPlanBean;
import cn.com.homeyoda.aimate.aihealth.bean.SportPlanTitleBean;
import cn.com.homeyoda.aimate.aihealth.bean.SystemBean;
import cn.com.homeyoda.aimate.aihealth.bean.UnJoinPlanBody;
import cn.com.homeyoda.aimate.aihealth.bean.UpdateUserInfoBean;
import cn.com.homeyoda.aimate.aihealth.bean.UploadFileBean;
import cn.com.homeyoda.aimate.aihealth.bean.UploadVideoBean;
import cn.com.homeyoda.aimate.aihealth.bean.UploadVideoShareBean;
import cn.com.homeyoda.aimate.aihealth.bean.UserInfoBean;
import cn.com.homeyoda.aimate.aihealth.bean.UserIntegralBean;
import cn.com.homeyoda.aimate.aihealth.bean.UserRecordsBean;
import cn.com.homeyoda.aimate.aihealth.bean.VideoShareBean;
import cn.com.homeyoda.aimate.aihealth.bean.VideoShareListBean;
import cn.com.homeyoda.aimate.aihealth.bean.VisualBean;
import cn.com.homeyoda.aimate.aihealth.bean.WeChatTabListBean;
import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;

/**
 * Created By 刘纯贵
 * Created Time 2020/4/29
 */
public interface HttpDataSource {

    Observable<BaseResponse<LoginBean>> register(String username, String password, String repassword);

    Observable<BaseResponse> loginout();

    Observable<BaseResponse<BaseArticleBean<List<ArticleBean>>>> getArticle(int pageNum);

    Observable<BaseResponse<UserIntegralBean>> getIntegral();

    Observable<BaseResponse<List<SystemBean>>> getSystemItem();

    Observable<BaseResponse<List<NavigationBean>>> getNavigationItem();

    Observable<BaseResponse<List<SystemBean>>> getProjectList();

    Observable<BaseResponse<BaseArticleBean<List<ArticleBean>>>> getProjectArticleList(int pageNum,
                                                                                       int id);

    Observable<BaseResponse<List<WeChatTabListBean>>> getWeChatTabList();

    Observable<BaseResponse<BaseArticleBean<List<ArticleBean>>>> getWechatArticleItem(int pageNum,
                                                                                      int id);

    Observable<BaseResponse<List<BannerBean>>> getBanner();

    Observable<BaseResponse<BaseArticleBean<List<LevelDataBean>>>> getLevelData(int pageNum);

    Observable<BaseResponse<BaseArticleBean<List<RankingBean>>>> getRankingData(int pageNum);

    Observable<BaseResponse<BaseArticleBean<List<ArticleBean>>>> getCollectionData(int pageNum);

    Observable<BaseResponse> collectionArticle(int id);

    Observable<BaseResponse> unCollectionArticle(int id);

    Observable<BaseResponse> unCollectionArticle(int id, int originId);

    Observable<BaseResponse<BaseArticleBean<List<ArticleBean>>>> getSystemTypeItem(int pageNum,
                                                                                   int id);

    Observable<BaseResponse2<Object>> getVideoUrl();

    Observable<BaseResponse2<UploadVideoBean>> uploadVideo(MultipartBody.Part videoPart, RequestBody deviceIdBody);

    Observable<ExaminationReportListBean> examinationReportList(String id, String pageSize, String pageNum, String infoId);

    Observable<ExaminationReportDetailsBean> examinationReportDetails(String id);
    Observable<BaseResponse2> deleteReport(String id);
    Observable<InspectionScheduleBean> inspectinsSchedule(String id);
    Observable<InspectionScheduleTypeBean> inspectinsScheduleType(String infoId, String type, String startTime,
                                                                  String endTime, String pageSize, String pageNum, String sort);


    Observable<VisualBean> getVisualRecord(String infoId, String type, String startTime, String endTime, int pageSize, int pageNum);

    Observable<BloodPressureBean> getBloodPressureRecord(String infoId, String type, String startTime, String endTime, int pageSize, int pageNum);

    Observable<BaseResponse2<List<QuestionnaireTopicBean>>> getQuestionnaireTopic(String id);
    Observable<BaseResponse2<List<QuestionnaireOptionBean>>> getQuestionnaireOption(String id);
    Observable<QuestionnaireNetBean> getQuestionnaireList(int pageSize, int pageNum);
    Observable<BaseResponse2> submitQuestionnaireAnswer(QuestionnaireAnswerBean answerBean);


    Observable<FeedbackTypeBean> getFeedBackType();
    Observable<BaseResponse2> uploadFeedBack(JsonObject params);

    Observable<FeedBackListBean> feedBackList(String userId, String type, String describe,
                                              String pageSize, String pageNum);
    Observable<FeedBackDetailsBean> feedBackDetails(String id);
    Observable<IsShowCompleteInfoBean> isShowCompleteInfo(String faceId);
    Observable<IsShowJoinFamilyBean> isShowJoinFamily(String faceId, String deviceId, String userId);
    Observable<BaseResponse2> completeInfo(JsonObject params);
    Observable<BaseResponse2> joinFamily(JsonObject params);
    Observable<PersonalInfoBean> getPersonalInfo(String faceId);
    Observable<MessageListBean> getMessageList(String userId, String pageSize, String pageNum);
    Observable<MessageDetailBean> getMessageDetail(String id);
    Observable<MessageTypeListBean> getMessageTypeList();
    Observable<MessageTypeListBean> getQuizTypeList();
    Observable<QuizListBean> getQuizList(String quizType, String pageSize, String pageNum);
    Observable<QuestionListBean> getQuestionList(String quizId);
    Observable<BaseResponse2> submitAnswer(AnswerBean answerBean);
    Observable<UserRecordsBean> getUserRecords(String userId, String quizType, String pageSize, String pageNum);
    Observable<AnswerAnalysisBean> getAnswerAnalysis(String quizRecordId);
    Observable<PossibleFamilyMembersBean> getPossibleFamilyMembers(String userId, String deviceId);
    Observable<FamilyMembersBean> getFamilyMembers(String familyId);
    Observable<BaseResponse2> updateFamilyName(String familyId, String familyName);
    Observable<PromptUserListBean> getPromptUserList(String familyId, String deviceId, int pageNum, int pageSize);
    Observable<BaseResponse2> addFamilyMember(String familyId, String faceId);
    Observable<BaseResponse2> deleteFamilyMember(String familyId, String faceId);
    Observable<IsUpdateBean> isUpdateMember(String id, String faceId, String userId);
    Observable<UserInfoBean> getUserInfo(String userInfoId);
    Observable<BaseResponse2> addUserInfo( AddUserInfoBean addUserInfoBean);
    Observable<BaseResponse2> updateUserInfo(UpdateUserInfoBean updateUserInfoBean);
    Observable<BaseResponse2> deleteUserInfo( JsonObject params);

    Observable<PopularListBean> getPopularList(String type, String pageNum, String pageSize);

    Observable<PopularDetailBean> getPopularDetail(String id);
    Observable<MessageTypeListBean> getPopularType();
    Observable<BaseResponse2> readMsg(String id);
    Observable<DeviceIsAuthBean> deviceIsAuth(String deviceSn);

    Observable<BaseResponse2<LoginQrCodeBean>> getLoginQrCode();
    Observable<BaseResponse2> selectFamilyLoginByCode(String loginSignCode);
    Observable<BaseResponse2<LoginBean>> login(String deviceSn, String phone);
    Observable<ReplenishChronicBean> replenishChronicList(String faceId);
    Observable<HomeReportListBean> homeReportList(String deviceSn, String familyId,
                                                  String pageNum, String pageSize);

    Observable<UploadFileBean> uploadFile(RequestBody body);

    Observable<KePuBannerList> getKePuBannerList();

    Observable<FaceInfoBean> queryFaceInfo(String faceId, String familyId);

    Observable<RecommendRecipeBean> queryRecommendRecipe(String faceId);
    Observable<BmiBean> queryBmi(String faceId);

    Observable<VideoShareListBean> getVideoShareList(long id, int pageNum, int pageSize);

    Observable<VideoShareBean> getVideoShare(long id);

    Observable<BaseResponse2> deleteVideoShare(long id);

    Observable<BaseResponse2> updateShareStatus(long id, int status);

    Observable<BaseResponse2> getShareConfig(long id);

    Observable<BaseResponse2> uploadVideoShare(UploadVideoShareBean bean);

    Observable<BaseResponse2> updateVideoShare(UploadVideoShareBean bean);

    Observable<ExaminationReportBean> getExaminationReportList(String userId, String infoId, int pageNum, int pageSize);

    Observable<SportPlanTitleBean> sportPlanTypes();

    Observable<SportPlanBean> querySportPlans(String planType);

    Observable<MyselfPlanBean> queryMyselfPlan(String faceId, String planId, String queryDate);

    Observable<MyselfPlanBean> hasSelfPlan(String faceId);

    Observable<ChronicDiseaseItemBean> attentionChronicList();

    Observable<ChronicDiseaseItemBean> attentionChronicAdd(String faceId, String dictCodes);


    Observable<MyselfPlanBean> bindSportPlan(JoinPlanBody jsonObject);

    Observable<MyselfPlanBean> unbindSportPlan(UnJoinPlanBody jsonObject);

    Observable<QueryLinkBean> queryLink(String link);
    Observable<DeviceIdBean> getDeviceId(String deviceSn);
    Observable<BindUserQrCode> getBindUserQrCode(String deviceSn);

    Observable<FaceIdBean> queryFaceIdByImage(MultipartBody.Part file);

    Observable<AddFaceBean> uploadFaceImage(MultipartBody.Part file);

    Observable<BaseResponse2> uploadExaminationVideo(MultipartBody.Part video, RequestBody useDeviceId,
                                                     RequestBody faceId,
                                                     RequestBody deviceId);

    Observable<ExaminationDetail> fetchExaminationDetail(String examinationId);

}
